<?php
	class NavigationView
	{
		// Member variables
		private $_userPressedRegister = "IWantToRegister";
		
		// Constants
		const IWANTTOREGISTER = "registerMe";
		const IWANTTOLOADMESSAGING = "Messaging";
		const IWANTTOREADMESSAGE = "MessageId";
		const IWANTTOWRITEANEWMESSAGE = "NewMessage";
		const IWANTTOLOADAPROFILE = "User";
		const IWANTTOCHECKOPTIONS = "Options";
		const IWANTTOSAVEOPTIONS = "Save";
		const IWANTTOADMIN = "Admin";
		const IWANTTOADDUSER = "AddUser";
		const IWANTTODELETEID = "DeleteUserId";
		const IWANTTODELETEUSERNAME = "DeleteUsername";
		const IWANTTOVIEWERRORS = "ErrorLog";
		const IWANTTOVIEWMEMBERLIST = "Memberlist";		
		const LINKTEXTBACKTOMESSAGING = "Back";
		const LINKTEXTREGISTER = "Register";
		const LINKTEXTHIDE = "Hide";
		const LINKTEXTHOME = "Home";
		const LINKTEXTPROFILE = "My profile";
		const LINKTEXTOTPIONS = "Options";
		const LINKTEXTADMIN = "Administrate";
		const LINKTEXTADDUSER = "Add user";
		const LINKTEXTBACKTOADMIN = "Back to admin";
		const LINKTEXTVIEWERRORS = "Error-log";
		const LINKTEXTMEMBERLIST = "Memberlist";
		const LINKTEXTMESSAGING = "Messaging";
		const LINKTEXTNEWMESSAGE = " New message";
		const LINKTEXTNEWMESSAGES = " New messages";

		
		public function GetWantToRegisterLink()
		{
			return "<a href='" . $this->GetFormActionLink() . "?$this->_userPressedRegister' method='post'>" . NavigationView::LINKTEXTREGISTER . "</a><br />";
		}
		
		public function GetWantToGoBackFromRegisterLink()
		{
			return "<a href='" . $this->GetFormActionLink() . "' method='post'>" . NavigationView::LINKTEXTHIDE . "</a><br />";
		}
		
		public function UserPressedRegister()
		{
			if (isset($_GET[$this->_userPressedRegister]) == true)
			{
				return true;
			}
			return false;
		}
		
		// Returns the adress base.
		public function GetFormActionLink()
		{
			return "Index.php";
		}
		
		// Returns the Options adress. 
		public function GetOptionAdress()
		{
			$ret = $this->GetFormActionLink() . "?Options=true";
			return $ret;
		}
		
		// Returns the admin adress.
		public function GetAdminAdress()
		{
			$ret = $this->GetFormActionLink() . "?Admin=true";
			return $ret;
		}
		
		// Returns the add user adress.
		public function GetAddUserAdress()
		{
			$ret = $this->GetFormActionLink() . "?AddUser=true";
			return $ret;
		}
		
		// Returns the errorlog adress.
		public function GetViewErrorLogAdress()
		{
			$ret = $this->GetFormActionLink() . "?ErrorLog=true";
			return $ret;
		}
		
		// Returns the memberlist adress.
		public function GetMemberlistAdress()
		{
			$ret = $this->GetFormActionLink() . "?Memberlist=true";
			return $ret;
		}
		
		// Returns the memberprofile adress.
		public function GetMemberProfileAdress()
		{
			$ret= $this->GetFormActionLink() . "?Member=";
			return $ret;
		}
		
		// Returns the messaging adress.
		public function GetMessagingAdress()
		{
			$ret = $this->GetFormActionLink() . "?Messaging=true";
			return $ret;
		}
		
		// Returns the new message adress.
		public function GetNewMessageLink()
		{
			$ret = $this->GetFormActionLink() . "?NewMessage=true";
			return $ret;
		}
	}